name: "Language Translator"
slug: "language-translator"
icon: "text"
category_slugs: ["marketing", "productivity"]
description: "Use ChatGPT to translate given text to any desired language"
provider_slug: "promptly"
pages:
  - title: "Settings"
    description: "Configure your language translator"
    input_fields:
      - name: "input_language"
        title: "Input language"
        type: "string"
        description: "Default value for the user input language"
        path: "input_fields[1].default"
      - name: "output_language"
        title: "Output language"
        type: "string"
        description: "Default value for expected output language"
        path: "input_fields[2].default"
app:
  name: "Language Translator"
  slug: "language-translator"
  description: "Use ChatGPT to translate given text to any desired language"
  type_slug: "web"
  input_fields:
    - name: "input"
      title: "Input"
      type: "text"
      description: "Text to translate"
    - name: "input_language"
      title: "Input Language"
      type: "string"
      description: "Language the input text is in"
    - name: "output_language"
      title: "Output Language"
      type: "string"
      description: "Language to translate input text to"
  output_template:
    markdown: |
      {{_inputs1.choices[0].content}}
  processors:
    - id: "_inputs1"
      provider_slug: "openai"
      processor_slug: "chatgpt"
      input:
        {
          "messages":
            [
              {
                "name": "",
                "role": "user",
                "content": "Translate below user input from {{_inputs0.input_language}}  to {{_inputs0.output_language}} \n----\nInput: {{_inputs0.input}} ",
                "function_call": { "name": "", "arguments": "" },
              },
            ],
          "chat_history": [],
          "system_message": "You are a language translator",
        }
      config:
        {
          "n": 1,
          "model": "gpt-4",
          "top_p": 1,
          "stream": true,
          "max_tokens": 1024,
          "temperature": 0.7,
          "retain_history": false,
          "presence_penalty": 0,
          "frequency_penalty": 0,
          "auto_prune_chat_history": false,
        }
